import { Route } from 'react-keeper'
const PagePending = require('./subpages/pending')
const PagePendingContent = require('./subpages/pending/subpagecontent/detailflow')
const PageApprovalSuggest = require('./subpages/pending/subpagecontent/detailflow/subpages/approvalsuggest')
const PageSponsored = require('./subpages/sponsored')
const PageCopy = require('./subpages/copy')
const PageChangereq = require('./subpages/changereq')
const PageChangerecord = require('./subpages/changerecord')
const PageProgresstrack = require('./subpages/progresstrack')
const PageSingleproject = require('./subpages/singleproject')
const PagePayprogress = require('./subpages/payprogress')
const PageSoftware = require('./subpages/software')
const PageWorkplan = {
    page: require('./PageWorkplan'),
    route: () => {
        return (<Route path='/workplan' component={Workplan} />
        )
    }
}

const Workplan = () => {
    return (
        <div>
            <Route index component={PageWorkplan.page} ></Route>
            <Route name="待我审批的" path='/pending' component={Pending} />
            <Route name="我发起的" path='/sponsored' component={PageSponsored} />
            <Route name="抄送我的" path='/copy' component={PageCopy} />
            <Route name="变更申请" path='/changereq' component={PageChangereq} />
            <Route name="变更记录" path='/changerecord' component={PageChangerecord} />
            <Route name="软件开发" path='/software' component={PageSoftware} />
            <Route name="进度跟踪" path='/progresstrack' component={PageProgresstrack} />
            <Route name="单个项目" path='/singleproject' component={Single} />
                     
        </div>)
}
const Pending = () => {
    return (
        <div>
            <Route name="待我审批的" index component={PagePending} />
            <Route name="待我审批的详情页" path='/detail(/:tool)' component={PagePendingContent} />
            <Route name="审批意见" path='/detail(/:tool)/suggestion' component={PageApprovalSuggest} />
        </div>)
}

const Single = () => {
    return (
        <div>
            <Route name="单个项目" index component={PageSingleproject} />
            <Route name="进度跟踪" path='/payprogress' component={PagePayprogress} /> 
        </div>)
}
export default PageWorkplan;